package com.lanhai.zhonglai;
  

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 

/**
 * Hello world!
 *
 */
public class App 
{
	 private static final Logger logger = LogManager.getLogger(App.class);  
	 
	 
    public static void main( String[] args ) throws Exception
    {
    	logger.info( "Hello,蓝海AGV!，输入C退出程序" );
    	 @SuppressWarnings("resource")
		ApplicationContext context = new ClassPathXmlApplicationContext("classpath:spring-config.xml");
        
		// ApplicationContext context = new FileSystemXmlApplicationContext  (spring);
        
        //启动侦听
        ListenerManager listen=(ListenerManager)context.getBean(ListenerManager.class);
        listen.start();
         
        while(true) {
			Thread.sleep(1000); 
		}  
    }  
    
    public static void main111  ( String[] args ) throws Exception
    {
    	logger.info( "Hello,蓝海AGV!，输入C退出程序" );
    	 @SuppressWarnings("resource")
		ApplicationContext context = new ClassPathXmlApplicationContext("classpath:spring-config.xml");
        
		// ApplicationContext context = new FileSystemXmlApplicationContext  (spring);
        
        //启动侦听
    	 Test listen=(Test)context.getBean(Test.class);
      //  listen.testroad();
        listen.testpower();
     //   listen.test();
    }  
}
